package de.tu_darmstadt.gdi1.battleship.view;

import java.util.HashMap;

import org.omg.CORBA.Environment;

/**
 * Class containing the filenames of all images needed for a skin.
 * 
 */
public class Skin {

	// needed Images:
	// l, r, t, b, v, h, L, R, T, B, V, H, −, ∗ wie in Aufgabenstellung
	// # Treffer, noch nicht versenkt
	// | Border

	private HashMap<String, String> images = new HashMap();

	/**
	 * create new Skin with given images.
	 * 
	 * @param left
	 * @param right
	 * @param top
	 * @param bottom
	 * @param vertical
	 * @param horizontal
	 * @param leftHit
	 * @param rigthHit
	 * @param topHit
	 * @param bottomHit
	 * @param verticalHit
	 * @param horizontalHit
	 * @param water
	 * @param waterHit
	 * @param border
	 */
	public Skin(String left, String right, String top, String bottom,
			String vertical, String horizontal, String leftHit,
			String rigthHit, String topHit, String bottomHit,
			String verticalHit, String horizontalHit, String water,
			String waterHit, String border) {
		images.put("l", left);
		images.put("r", right);
		images.put("t", top);
		images.put("b", bottom);
		images.put("v", vertical);
		images.put("h", horizontal);
		images.put("L", leftHit);
		images.put("R", rigthHit);
		images.put("T", topHit);
		images.put("B", bottomHit);
		images.put("V", verticalHit);
		images.put("H", horizontalHit);
		images.put("-", water);
		images.put("*", waterHit);
		images.put("|", border);
	}

	/**
	 * creates new Skin with default images.
	 */
	public Skin() {
		// System.out.println(System.getProperty("user.dir"));
		// System.out.println();

		images.put("l",	"src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_left.png");
		images.put("r", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_right.png");
		images.put("t", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_top.png");
		images.put("b", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_bottom.png");
		images.put("v", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_vertical.png");
		images.put("h", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_horizontal.png");
		images.put("L", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_left.png");
		images.put("R", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_right.png");
		images.put("T", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_top.png");
		images.put("B", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_bottom.png");
		images.put("V", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_vertical.png");
		images.put("H", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/ship_hit_horizontal.png");
		images.put("-", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/water.png");
		images.put("*", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/water_hit.png");
		images.put("|", "src/de/tu_darmstadt/gdi1/resources/images/defaultskin/border.png");

	}

	public HashMap<String, String> getImages() {
		return images;
	}

}
